﻿using Bmz.IM.AccessDB;
using Bmz.IM.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Bmz.IM.Communication
{
    public class UserInfo
    {
        UserAccess userAc = new UserAccess();
        public bool Authentication(string userId,string pwd)
        {
            return userAc.IsExistByUserIdAndPwd(userId,pwd);
        }

        public UserVO GetUser(string userId)
        {
            UserPO userPO=userAc.GetUserModelByUserId(userId);
            UserVO userVO = new UserVO()
                {
                    UserId = userPO.UserId,
                    UserName=userPO.UserName,
                    Ip=userPO.Ip,
                    Port=userPO.Port,
                };
            return userVO;
        }

    }


}
